<template>
    <el-select v-model.trim="value" :placeholder="placeholder">
        <el-option
            v-for="item in datas"
            :key="item"
            :label="item"
            :value="item"
        />
    </el-select>
</template>
<script>
export default {
    name: 'SearchSelect',
    props: {
        placeholder: {
            required: false,
            default: '',
        },
        datas: {
            required: true,
            default: [],
        },
        modelValue: {},
    },
    computed: {
        value: {
            get() {
                return this.modelValue;
            },
            set(value) {
                this.$emit('update:modelValue', value);
            },
        },
    },
};
</script>
